@ Copyright (c) 2019 GCCSDK Developers
@ Written by Lee Noar

#define PAGE_SHIFT	12
.set	SYSTEMCONTROLHANDLER_DATAABORT,	3
.set	ABORT_HANDLER_PASS_ON,		0
.set	ABORT_HANDLER_CLAIM,		1

.set	DEBUG_HANDLER_DUMP_REGS,	1
.set	ABORT_COLLECT_STATS,		1

.set	XOS_ChangeEnvironment,		0x20040
.set	XOS_DynamicArea,		0x20066
.set	XOS_Memory,			0x20068

.set	OSDYNAMICAREA_REASON_PHYSICALOP,21
.set	OSDYNAMICAREA_REASON_LOGICALOP,	22

.set	PMP_PAGE_RELEASE,		-1
.set	PMP_PAGE_UNMAP,			-1
.set	PMP_PAGE_KERNEL_CHOICE,		-2

.set	STACK_NAME_MAX_LEN,		32

			.struct	0
LINKHDR_PREV:		.skip	4
LINKHDR_NEXT:		.skip	4
LINKHDR_STRUCT_SIZE:

			.struct	0
LINKLIST_FIRST:		.skip	4
LINKLIST_LAST:		.skip	4
LINKLIST_COUNT:		.skip	4
LINKLIST_STRUCT_SIZE:

			.struct	0
DA_NUMBER:		.skip	4
DA_START:		.skip	4
DA_END:			.skip	4
DA_STRUCT_SIZE:

			.struct	0
ALLOCATOR_LINK:		.skip	LINKHDR_STRUCT_SIZE
ALLOCATOR_VALIDATE:	.skip	4
ALLOCATOR_DA:		.skip	DA_STRUCT_SIZE
ALLOCATOR_BLOCK_LIST:	.skip	LINKLIST_STRUCT_SIZE
ALLOCATOR_FLAGS:	.skip	4
ALLOCATOR_STRUCT_SIZE:

				.struct	0
STACK_LINK:			.skip	LINKHDR_STRUCT_SIZE
STACK_BASE:			.skip	4
STACK_TOP:			.skip	4
STACK_SIZE:			.skip	4			@ In pages
STACK_GUARD_SIZE:		.skip	4			@ In pages
STACK_NAME:			.skip	STACK_NAME_MAX_LEN
STACK_STRUCT_SIZE:

				.struct	0
ABORT_BLOCK_FIRST_HANDLER:	.skip	4
ABORT_BLOCK_FIRST_STACK:	.skip	4
ABORT_BLOCK_CURRENT_APP:	.skip	4
ABORT_BLOCK_STACK_ALLOCATOR:	.skip	4
ABORT_BLOCK_IN_HANDLER:		.skip	4
ABORT_BLOCK_OLD_HANDLER:	.skip	4
ABORT_BLOCK_SIZE:

			  .struct	0
APP_LINK:			.skip	LINKHDR_STRUCT_SIZE
APP_ID:				.skip	4
APP_ALLOCATOR_LIST:		.skip	LINKLIST_STRUCT_SIZE
APP_ABORT_HANDLER_LIST:		.skip	LINKLIST_STRUCT_SIZE
APP_STACK_LIST:			.skip	LINKLIST_STRUCT_SIZE
APP_ABORT_LAST_WIMP_COUNT:	.skip	4
APP_ABORT_HIGHEST_WIMP_COUNT:	.skip	4
APP_ABORT_TOTAL_COUNT:		.skip	4
APP_STRUCT_SIZE:

				.struct 0
GLOBALS_STACK_ALLOCATOR:	.skip	4
GLOBALS_APP_LIST:		.skip	LINKLIST_STRUCT_SIZE
GLOBALS_ALLOCATOR_LIST:		.skip	LINKLIST_STRUCT_SIZE
GLOBALS_PRE_FILTER_INSTALLED:	.skip	4
GLOBALS_POST_FILTER_INSTALLED:	.skip	4
GLOBALS_STRUCT_SIZE:

				.struct	0
ABORT_LINK:			.skip	LINKHDR_STRUCT_SIZE
ABORT_HANDLER_ROUTINE:		.skip	4
ABORT_HANDLER_R12_DATA:		.skip	4
ABORT_STRUCT_SIZE:

				.struct	0
PMP_PHY_PAGE_ENTRY_INDEX:	.skip	4
PMP_PHY_PAGE_ENTRY_NUMBER:	.skip	4
PMP_PHY_PAGE_ENTRY_FLAGS:	.skip	4
PMP_PHY_PAGE_ENTRY_SIZE:

				.struct	0
PMP_LOG_PAGE_ENTRY_NUMBER:	.skip	4
PMP_LOG_PAGE_ENTRY_INDEX:	.skip	4
PMP_LOG_PAGE_ENTRY_FLAGS:	.skip	4
PMP_LOG_PAGE_ENTRY_SIZE:

				.struct	0
PMP_INFO_PAGE_INDEX:		.skip	4
PMP_INFO_PHY_PAGE_NUMBER:	.skip	4
PMP_INFO_DA_PAGE_NUMBER:	.skip	4
PMP_INFO_FLAGS:			.skip	4
PMP_INFO_STRUCT_SIZE:
